import { ResponseInterceptor } from './../../../interceptor/response/response.interceptor';
import config from 'src/config/config';
import { Body, Controller, Delete, Get, Patch, Post, Query, UseInterceptors } from '@nestjs/common';
import { GoodsTypeAttributeService } from 'src/service/goods-type-attribute/goods-type-attribute.service';

@Controller(`${config.adminPath}/goodsTypeAttribute`)
@UseInterceptors(ResponseInterceptor)
export class GoodsTypeAttributeController {
    constructor(private readonly goodsTypeAttributeService: GoodsTypeAttributeService) {}
    @Get()
    async find(@Query() query) {
        return await this.goodsTypeAttributeService.find(query);
    }
    @Post()
    async create(@Body() body) {
        return await this.goodsTypeAttributeService.create(body);
    }
    @Patch()
    async update(@Body() body) {
        return await this.goodsTypeAttributeService.update(body);
    }
    @Delete()
    async delete(@Body() body) {
        return await this.goodsTypeAttributeService.delete(body);
    }
}
